package router

import (
	"longmen/server/internal/api"
	"longmen/server/pkg/common/middlewares"

	"github.com/labstack/echo/v4"
)

func initGuessRoute(group *echo.Group, base api.Controller, authFunc echo.MiddlewareFunc) {
	group.POST("/guess/createQuestion", base.CreateQuestion, authFunc)
	group.POST("/guess/getQuestionList", base.GetQuestionList, authFunc)
	group.POST("/guess/delQuestion", base.DelQuestion, authFunc)

	group.POST("/guess/createGuess", base.CreateGuess, authFunc)
	group.POST("/guess/getGuess", base.GetGuess)
	group.POST("/guess/getGuessList", base.GetGuessList, authFunc)

	group.POST("/guess/settleGuess", base.SettleGuess, authFunc)
	group.POST("/guess/closeGuess", base.CloseGuess, authFunc)
	group.POST("/guess/cancelGuess", base.CancelGuess, authFunc)

	group.POST("/guess/createGuessOrder", base.CreateGuessOrder, middlewares.ActionStep, authFunc)
	group.POST("/guess/getGuessOrder", base.GetGuessOrder, authFunc)
	group.POST("/guess/getGuessOrderList", base.GetGuessOrderList, authFunc)
	group.POST("/guess/list", base.GuessList)
}
